/******************** (C) COPYRIGHT 2013 InMotion ******************************
* File Name 	: FIR_Filter.h
* Author 		: InMotion
* Version 		: V0.0.1
* Date 			: 2013-5-1
* Description 	: FIR滤波
*******************************************************************************/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __FIR_FILTER_H__
#define __FIR_FILTER_H__

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx.h"
//#include "my_type.h"

/* Exported types ------------------------------------------------------------*/
typedef struct
{
	s32 *delay;		 //暂存数量
	const s32 *factor;
	s32 tap;	
}FIR_FILTER_Int_DEF;

typedef struct
{
	float *delay;		 //暂存数量
	const float *factor;
	s32 tap;	
}FIR_FILTER_Float_DEF;

/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
s32 FIR_Filter_int(FIR_FILTER_Int_DEF *filter, s32 invar) ;
float FIR_Filter_float(FIR_FILTER_Float_DEF *filter, float invar) ;
void FIR_Filter_float_Clear(FIR_FILTER_Float_DEF *filter);
void FIR_Filter_int_Clear(FIR_FILTER_Int_DEF *filter);

/* Exported variables ------------------------------------------------------- */

#endif /* __FIR_FILTER_H__ */

/********************** (C) COPYRIGHT 2013 InMotion *****END OF FILE************/ 
